<template>
	<view class="container" v-if="dataObj">
		<view class="header">
			<view class="flexWrap">
				<view class="width-40">
					<i-icon v-if="dataObj.offerCount === 0" icon="icondingdandengdai" type="single" class="mr-10 middle" size="34rpx" color="#333"></i-icon>
					<i-icon v-else-if="dataObj.offerCount === 1" icon="icondindanwancheng" type="single" class="mr-10 middle" size="34rpx" color="#333"></i-icon>
					<i-icon v-else icon="iconfabu-cha" type="single" class="mr-10 middle" size="34rpx" color="#333"></i-icon>
					{{ offerCountList[dataObj.offerCount] }}
				</view>
				<view class="width-60 u-text-right font-24" v-if="dataObj.offerCount === 0 || dataObj.offerCount === 1">
					剩余询价时间:
					<u-count-down :timestamp="dataObj.betweenTime" :show-days="false" bg-color="#fcd31f" font-size="32" separator-size="32" color="#000"></u-count-down>
				</view>
			</view>
		</view>
		<view class="mids boxS mart40f ">
			<view class="flex  font26">
				<view class="width-25  color-999">询价主体：</view>
				<view class="color-333 width-75">{{ dataObj.store_Name }}</view>
			</view>
			<view class="flex pad-t-b-15 font26">
				<view class="width-25   color-999">联系人：</view>
				<view class="color-333 width-75">{{ dataObj.truename }}</view>
			</view>
			<view class="flex  font26">
				<view class="width-25   color-999">联系电话：</view>
				<view class="color-333 width-75">{{ dataObj.mobile }}</view>
			</view>
			<view class="flex pad-t-b-15 font26">
				<view class="width-25   color-999">收货地址：</view>
				<view class="color-333 width-75">{{ dataObj.address }}</view>
			</view>
			<view class="flex  font26">
				<view class="width-25   color-999">询价时间：</view>
				<view class="color-333 width-75">{{ returnTime(dataObj.addTime) }}</view>
			</view>
			<view class="flex pad-t-b-15 font26">
				<view class="width-25   color-999">截止日期：</view>
				<view class="color-333 width-75">{{ returnTime(dataObj.deadline) }}</view>
			</view>
		</view>
		<view class="mids boxS">
			<view class="mid-item color-333 font-28">寻车型</view>
			<view class="mid-item  ">
				<view class="mid-left">规格：</view>
				<view class="mid-right">{{ dataObj.specificationName }}</view>
			</view>
			<view class="mid-item  ">
				<view class="mid-left">品牌：</view>
				<view class="mid-right text-line">{{ dataObj.branb_name }}</view>
			</view>
			<view class="mid-item  ">
				<view class="mid-left">车型：</view>
				<view class="mid-right text-line">{{ dataObj.car_type_name }}A6L</view>
			</view>
			<view class="mid-item  ">
				<view class="mid-left">款式：</view>
				<view class="mid-right text-line">{{ dataObj.car_name }}</view>
			</view>
			<view class="colorwrap flex pad-t-b-10  border-bottom0">
				<view class="mid-left font-24">外观内饰：</view>
				<view class="mid-right text-line font-24">
					<view class="" v-for="(color, ind) in dataObj.facade_pictureList" :key="ind">
						<view class="flex-jc-sb width-100 color-333" v-if="color.outerColour && color.inColour">
							<view :style="{ background: color.outerColour.colorCoding }" class="iconcolor"></view>
							{{ color.outerColour.color }} /{{ color.inColour.color }}
							<view v-if="color.inColour.neiColor.length == 1" :style="{ background: color.inColour.colorCoding }" class="iconcolor"></view>
							<view v-else class="iconcolor"><view class="iconcolor2" v-for="(it, i) in color.inColour.neiColor" :key="i" :style="{ background: it }"></view></view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="mids boxS ">
			<view class="mid-item color-333 font-28">补充信息</view>
			<view class="mid-item  ">
				<view class="mid-left">上牌地点</view>
				<view class="mid-right text-line">{{ dataObj.goods_region_name }}</view>
			</view>
			<view class="mid-item  ">
				<view class="mid-left">区域要求</view>
				<view class="mid-right text-line">{{ dataObj.region_limit_name }}</view>
			</view>
			<view class="mid-item  ">
				<view class="mid-left">手续</view>
				<view class="mid-right text-line">{{ dataObj.procedurName }}</view>
			</view>
			<view class="mid-item  ">
				<view class="mid-left">车辆详情</view>
				<view class="mid-right text-line">{{ dataObj.car_descriptionName }}</view>
			</view>
			<view class="mid-item border-bottom0 heightAuto">
				<view class="mid-left">备注</view>
				<view class="mid-right remakr">{{ dataObj.remark }}</view>
			</view>
		</view>
		<view class="mids boxS ">
			<view class="mid-item color-333 font-28">寻单信息</view>
			<view class="mid-item  border-bottom0">
				<view class="mid-left">寻车单号：</view>
				<view class="mid-right text-line">{{ dataObj.car_find_b_number }}</view>
				<view class="width-20 u-text-center copy" @click="copy(dataObj.car_find_b_number)">复制</view>
			</view>
			<view class="mid-item border-bottom0 height20">
				<view class="mid-left">创建时间：</view>
				<view class="mid-right  text-line">{{ returnTime(dataObj.addTime) }}</view>
			</view>
			<view class="mid-item  border-bottom0" v-if="dataObj.offerCount === 2">
				<view class="mid-left">过期时间：</view>
				<view class="mid-right text-line">{{ returnTime(dataObj.deadline) }}</view>
			</view>
			<view class="mid-item  border-bottom0" v-if="dataObj.offerCount === 3">
				<view class="mid-left">取消时间：</view>
				<view class="mid-right text-line">{{ returnTime(dataObj.updateTime) }}</view>
			</view>
		</view>
		<!--待报价-->
		<view class="fixedBottomBtn" v-if="dataObj.offerCount === 0">
			<view class="btn">
				<!-- #ifdef APP-PLUS -->
		<view class="btnWrap-3">
			<view class="left wid174" @click="getOffShelf = true">
				<i-icon icon="iconshanchu1" type="single" class="middle" size="34rpx" color="#ffe03b"></i-icon>
				<view class="">取消寻车</view>
			</view>
			<view class="middle-wrap wid174" @click="share">
				<i-icon icon="iconfenxiang" type="single" class="middle" size="34rpx" color="#ffe03b"></i-icon>
				<view class="">分享</view>
			</view>
			<view class="right wid350" @click="Inquiryedit">
				<i-icon icon="iconbianji-s" type="single" class="mr-5 middle" size="34rpx" color="#333"></i-icon>
				编辑
			</view>
		</view>
				<!-- #endif -->

				<!-- #ifdef H5 || MP-WEIXIN -->
				<view class="btnWrap width-100">
					<view class="left width-50" @click="getOffShelf = true">
						<i-icon icon="iconshanchu1" type="single" class="middle" size="34rpx" color="#ffe03b"></i-icon>
						<text style="color: #ffe03b; margin-left: 10rpx;">取消寻车</text>
					</view>
					<view class="right width-50" @click="Inquiryedit">
						<i-icon icon="iconbianji" type="single" class="mr-10 middle wid20" size="34rpx" color="#333"></i-icon>
						编辑
					</view>
				</view>
				<!-- #endif -->
			</view>
		</view>
		<!--已报价-->
		<view class="fixedBottomBtn" v-else-if="dataObj.offerCount === 1">
			<view class="btn cancel" @click="getOffShelf = true">
				<i-icon icon="iconquxiaoxunjia" type="single" class="mr-10 middle" size="34rpx" color="#ffe03b"></i-icon>
				取消寻车
			</view>
		</view>
		<!--已过期 -->
		<view class="fixedBottomBtn" v-else-if="dataObj.offerCount === 2">
			<view class="btn">
				<view class="btnWrap width-100">
					<view class="left width-50" @click="findthecarStatus = true">
						<i-icon icon="iconshangjia" type="single" class="mr-10 middle" size="34rpx" color="#ffe03b"></i-icon>
						上架
					</view>
					<view class="right width-50" @click="Inquiryedit">
						<i-icon icon="iconbianji-s" type="single" class="mr-10 middle" size="34rpx" color="#333"></i-icon>
						编辑
					</view>
				</view>
			</view>
		</view>
		<!--已取消 -->
		<view class="fixedBottomBtn" v-else-if="dataObj.offerCount === 3" @click="findthecarStatus = true"><view class="btn cancel onshelf">上架</view></view>
		<!-- 下架弹框 -->
		<u-popup v-model="getOffShelf" mode="center" border-radius="14" width="540rpx" height="365rpx">
			<view class="popup-title">取消寻车</view>
			<view class="popup-content">是否确定取消此条寻车信息？</view>
			<view class="btnWrap flex">
				<view class="width-50 left" @click="getOffShelf = false"><view class="inline-block">我再想想</view></view>

				<view class="width-50 right" @click="$u.throttle(Inquiryonshelves, 1000)">确认取消</view>
			</view>
		</u-popup>

		<ctime title="生产日期" :showsc="findthecarStatus" @confirmTime="confirmFindTheCarStatus" @closeTime="findthecarStatus = false"></ctime>
	</view>
</template>

<script src="./detailsForTheCar.js"></script>
<style lang="scss" scoped>
@import './detailsForTheCar.scss';
@import '../style/common.scss';
</style>
